Bug 346903 – gtk_enumerate_printers needs events to complete
authorMatthias Clasen <mclasen@redhat.com>
Wed, 17 Sep 2008 22:07:10 +0000 (22:07 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 17 Sep 2008 22:07:10 +0000 (22:07 +0000)
commit8ec27f776004b14839742829a85be9e580ff2799
tree021114df61a35a9a48121b0e49ecb2aea5300ca3
parentdf619a1370273305726416fc5eb04b46c267915c
Bug 346903 – gtk_enumerate_printers needs events to complete

2008-09-17  Matthias Clasen  <mclasen@redhat.com>

        Bug 346903 – gtk_enumerate_printers needs events to complete

        * gtk/gtkprintbackend.h:
        * gtk/gtkprintbackend.c: Add a GtkPrintBackend::status property.

        * modules/printbackends/cups/gtkcupsutils.h:
        * modules/printbackends/cups/gtkcupsutils.c: Turn the connection
        test into a tristate available/unavailable/in progress.

        * modules/printbackends/cups/gtkprintbackendcups.c: Use a single
        connection test instance for getting the default printer and for
        getting the printer list. Set the GtkPrintBackend::status property
        according to the result of the connection test. Use the printer-type
        attribute to find the default printer, if cups supports it.

        * gtk/gtkprinter.c: When enumerating printers, give up when
        the backend status is 'unavailable'.

        * gtk/gtkprintunixdialog.c (printer_status_cb): Select the printer
        when it is the default and nothing else has been selected yet.

svn path=/trunk/; revision=21417
ChangeLog
gtk/gtkprintbackend.c
gtk/gtkprintbackend.h
gtk/gtkprinter.c
gtk/gtkprintunixdialog.c
modules/printbackends/cups/gtkcupsutils.c
modules/printbackends/cups/gtkcupsutils.h
modules/printbackends/cups/gtkprintbackendcups.c